import { dialog } from "electron";

const selectFolder = async () => {
    const res = await dialog.showOpenDialogSync(undefined, { properties: ['openDirectory'] });
    if (res?.[0]) {
        return res[0].replace(/\\/g, '/').replace(':/', ":\\");
    }
    return null;
}

export default selectFolder;